import { createStore } from "vuex";
import createPersistedState from "vuex-persistedstate";

export default createStore({
  state: {
    isGetterToken: false,
    isCollapsed: false,
  },
  getters: {},
  mutations: {
    changeGetterToken(state, value) {
      state.isGetterToken = value;
    },
    changeCollapse(state) {
      state.isCollapsed = !state.isCollapsed;
    },
  },
  actions: {},
  modules: {},
  plugins: [
    createPersistedState({
      paths: ["isCollapsed"],
    }),
  ],
});
